<!DOCTYPE HTML>
<html manifest="testdata/with_fallback.appcache">
<head>
  <title>HTML5 application cache test with manifest</title>
  <script type="text/javascript" src="../test_bootstrap.js"></script>
  <script type="text/javascript">
    goog.require('bot.appcache');
    goog.require('bot.html5');
    goog.require('bot.test');
    goog.require('goog.testing.jsunit');
    goog.require('goog.userAgent');
    goog.require('goog.userAgent.product');
  </script>

  <script type="text/javascript">
    // WebDriver does not enable application cache for Android (b/5478400).
    // WebDriver does not enable application cache for Firefox (b/5787180).
    // Selenium breaks application cache on Opera (b/578165).
    var APPCACHE_NOT_WORKING =
      !bot.html5.isSupported(bot.html5.API.APPCACHE) ||
      goog.userAgent.product.ANDROID ||
      goog.userAgent.product.FIREFOX ||
      (goog.userAgent.OPERA && bot.test.isSeleniumBacked());

    function testGetStatusWithHtmlManifest() {
      if (APPCACHE_NOT_WORKING) {
        return;
      }

      var win = bot.getWindow();
      assertEquals(win.applicationCache.IDLE, bot.appcache.getStatus());
    }
  </script>
</head>
<body>
Test
<img id="red" src="testdata/ps_logo2.png">
</body>
</html>
